﻿Create proc [dbo].[danhmucMaSoThue_them]        
@MaSoThue varchar(25),        
@TenKH nvarchar(200)    
as        
declare @dem as int        
select @dem= COUNT(*) from DM_MSThue  where MaSoThue=@MaSoThue       
if(@dem>0)        
begin        
select ErrCode=0        
end        
else        
begin        
insert into  DM_MSThue (MaSoThue,TenKH) values(@MaSoThue,@TenKH)        
select ErrCode=1        
end      
